package net.towee.client.event.core;

import net.towee.model.group.GroupIdentity;

import com.google.gwt.event.shared.GwtEvent;

public class UserLeaveFromGroupEvent extends GwtEvent<UserLeaveFromGroupHandler> {

	public static Type<UserLeaveFromGroupHandler> TYPE = new Type<UserLeaveFromGroupHandler>();
	private final GroupIdentity identity;

	public UserLeaveFromGroupEvent(GroupIdentity result) {
		this.identity = result;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<UserLeaveFromGroupHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(UserLeaveFromGroupHandler handler) {
		handler.onUserLeaveGroup(identity);
	}

}
